home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / disk / lfnsrt12.zip / LFNSORT.TXT < prev   
Text File  |  1996-07-07  |  19KB  |  437 lines

  1. LFNSORT v 1.2 - Sorts DOS/Win95 directories
  2.  
  3. Copyright (c) 1995,1996 D.J. Murdoch.
  4.  
  5. 0. Contents of this file
  6.  
  7.    1. Syntax
  8.    2. Description
  9.    3. Details
  10.    4. Memory Limitations
  11.    5. Safety
  12.    6. License
  13.    7. Release History
  14.    8. Known bugs
  15.    9. Acknowledgments
  16.  
  17. 1. Syntax:
  18.  
  19.       LFNSORT sortkeys [dirname] [options]
  20.  
  21.         will sort the directory records on disk according to the
  22.         specified sort keys.
  23.  
  24.       Keys:
  25.         N - full filename
  26.         E - extension
  27.         D - last modification date
  28.         T - last modification time
  29.         C - creation date/time
  30.         A - last access date/time
  31.         S - size
  32.  
  33.         Place a "-" minus sign in front of a key to sort in descending
  34.         order instead of ascending order.  Keys can be combined, e.g.
  35.         "-DN" for "sorted by descending modification date, and by
  36.         ascending name within date".  Use "-" by itself as a placeholder
  37.         if you want no sort key.
  38.  
  39.       Options:
  40.         /8       base sort order on 8.3 version of names instead of long
  41.                  names
  42.         /C       case sensitive sort - ascii sort order
  43.         /D       mix directories in with files
  44.         /Debug file  write debug information to file
  45.         /F filename  read forced sort order from file (see below for
  46.                  syntax and examples
  47.         /NW      no write - changes won't be saved to disk
  48.         /S       sort subdirectories recursively
  49.         /System  don't sort system files first in the root dir
  50.         /V       verbose mode; list all directories and filenames after
  51.                  sorting
  52.  
  53.       Examples:
  54.  
  55.         To sort every subdirectory on drive C: by file extension then
  56.         filename:
  57.  
  58.           LFNSORT en c:\ /s
  59.  
  60.         To sort every directory on drive C: so that most recently
  61.         accessed files come first:
  62.  
  63.           LFNSORT -a-d-t c:\ /s
  64.  
  65.         (The "-d-t" is necessary because not all directory records
  66.         include an access time; older ones and ones created in DOS mode
  67.         will only have a modification time.)
  68.  
  69. 2. Description:
  70.  
  71.         The original Norton Utilities had a program called DS which
  72.         could sort your DOS directories according to your preferences.
  73.         Later versions added a graphical interface so you could manually
  74.         move files around.
  75.  
  76.         When Win95 came out with the VFAT long filenames, DS stopped
  77.         working.  It hadn't been written to handle the new directory
  78.         records.  Symantec (the current owners of the Norton Utilities)
  79.         haven't produced a new version of DS as far as I know, so when
  80.         Jacques Bensimon suggested that a minor modification to my
  81.         long filename backup utility DOSLFNBK could do directory sorts,
  82.         I decided that I wanted DS badly enough to write it myself.
  83.         There is already at least one freeware/shareware utility called
  84.         DIRSORT, so I called mine LFNSORT.
  85.  
  86. 3. Details:
  87.  
  88.       Disk locking:
  89.  
  90.         LFNSORT works on the disk drive at a pretty low level.  To be
  91.         allowed this access, it requests exclusive access to the drive
  92.         from Windows.  If another program has already requested
  93.         exclusive access, LFNSORT will exit and do nothing.  While
  94.         LFNSORT is running, other programs will not be allowed to write
  95.         to the disk or to create new files.  This may confuse them; it's
  96.         probably best not to attempt any other disk activity in the
  97.         middle of an LFNSORT run.  (LFNSORT has been written according to
  98.         Microsoft's instructions to work without damaging your disk even
  99.         if another program attempts access, but the other program might
  100.         not be.)
  101.  
  102.         LFNSORT handles the disk locking itself.  In fact, if you use
  103.         the LOCK command to lock the drive, LFNSORT will be unable to
  104.         obtain a lock, and will not run.
  105.  
  106.         If you run LFNSORT under DOS, or in a version of Windows that
  107.         doesn't support drive locking, it will still run.  If it detects
  108.         Windows it will warn you that running in a multitasker without
  109.         protecting the disk from changes is dangerous, and will only
  110.         go ahead if you confirm you really mean it.  If it doesn't detect
  111.         Windows, it will assume that it is safe to go ahead --- so if
  112.         you're using another multitasker like Desqview, use it with
  113.         extreme care!
  114.  
  115.       Forcing a particular order:
  116.  
  117.         The /F option takes a plain ascii file as an argument.  This
  118.         file should have the following format:
  119.  
  120.            \directory1
  121.            firstfile
  122.            secondfile
  123.            thirdfile
  124.  
  125.            \directory2
  126.            afile
  127.            bfile
  128.            cfile
  129.  
  130.         Specifically:  any line with a backslash "\" in it is taken as a
  131.         directory name, any other non-blank line is taken as a filename.
  132.  
  133.         These will force the files in directory1 and directory2 into the
  134.         order given.  If a file isn't listed, it will normally appear
  135.         *after* all the listed files.  However, you can override this by
  136.         putting a "*" entry in place of a file; then all unlisted files
  137.         will be placed there.  For example,
  138.  
  139.           \directory
  140.           firstfile
  141.           *
  142.           lastfile
  143.  
  144.         will guarantee the placement of those two files, but sort
  145.         everything else according to the specified sort keys.  (Hint:
  146.         if you want to use the file to specify part of the order but
  147.         make no other changes, use "-" as a sort key.)
  148.  
  149.         The order in which the directory sections appear in this file is
  150.         ignored. If you want directories in a particular order, list
  151.         them in a section for their parent directory. If you don't
  152.         specify any directory name, the ordering is used as a default
  153.         for unlisted directories. For example, to put README.1ST
  154.         files first in every directory where they exist, put a single
  155.         line containing "README.1ST" into a file called FORCED.LST, and
  156.         run
  157.  
  158.           LFNSORT - c:\ /f forced.lst
  159.  
  160.         File and directory names in this file may normally be either 8.3
  161.         aliases or long filenames, but if you're running outside Windows
  162.         where there is no long filename support, you *must* use the 8.3
  163.         alias.
  164.  
  165.         If you want to force the file order for a large collection of
  166.         directories, you can use the /V option to create a preliminary
  167.         version of the forcing file.  For example,
  168.  
  169.           LFNSORT - c:\ /D/System/NW/S/V >new.lst
  170.  
  171.         will write a list of the files in their current order
  172.         into the "new.lst" file.  The - specifies no sorting, and the
  173.         /D and /System options turn off the default actions for
  174.         directories and system files.
  175.  
  176.       Moving system files:
  177.  
  178.         Normally the root directory of your boot drive has IO.SYS first,
  179.         and MSDOS.SYS in the second place.  As long as these are left
  180.         with the System and Hidden attributes set, LFNSORT won't move
  181.         them.  However, if you accidentally move them and want to
  182.         restore them to the start of the directory (because some
  183.         versions of DOS won't boot if they get moved):
  184.  
  185.         Put these two lines in a file called FORCED.LST:
  186.  
  187.           IO.SYS
  188.           MSDOS.SYS
  189.  
  190.         and run
  191.  
  192.           LFNSORT - c:\ /F forced.lst /System /D
  193.  
  194.       Volume labels:
  195.  
  196.         Pre-7.0 versions of DOS can be confused by long filename
  197.         records, which look to them like volume labels.  This can be
  198.         fixed by putting the volume label before any long filenames in
  199.         the directory, but the Win95 LABEL command doesn't do this.
  200.         LFNSORT fixes this, unless you use the /System option, in which
  201.         case the volume label will be sorted like a file record.  Don't
  202.         put the volume label ahead of your boot files, if you want your
  203.         disk to be bootable.
  204.  
  205.         Example:  If you want to put the volume label "BIG DRIVE" just
  206.         after IO.SYS and MSDOS.SYS, set FOR